package lgs.hm.service.impl;

import java.util.List;

import javax.annotation.Resource;  //依赖注入 autoWried

import org.springframework.stereotype.Service;

import lgs.hm.mapper.EmployeeMapper;
import lgs.hm.model.Employee;
import lgs.hm.service.EmployeeService;

@Service  //相当于@Component @Controller进容器
public class EmployeeServiceImpl implements EmployeeService{  //对Service实现
	
	@Resource  //依赖注入=@autoWried
	private EmployeeMapper employeeMapper;
	
	public List<Employee> findAll() throws Exception{
		return employeeMapper.findAll();
	}
	
	@Override
	public boolean insert(Employee map) {
		return employeeMapper.insert(map);
	}

	@Override
	public boolean update(Employee map) {
		return employeeMapper.update(map);
	}

	@Override
	public boolean delet(Employee map) {
		return employeeMapper.delet(map);
	}

	@Override
	public List<Employee> select() throws Exception {
		return employeeMapper.select();
	}

	@Override
	public List<Employee> findAll8(Integer number) {
		return employeeMapper.findAll8(number);
	}

	@Override
	public List<Employee> findAllEmp() {
		return employeeMapper.findAllEmp();
	}

	@Override
	public boolean insertEmp(Employee employee) {
		return employeeMapper.insertEmp(employee);
	}

	@Override
	public boolean updateEmp(Employee employee) {
		return employeeMapper.updateEmp(employee);
	}

	@Override
	public boolean deleteEmp(Integer min,Integer max) {
		return employeeMapper.deleteEmp(min,max);
	}
	
	

}
